import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '@/views/login'
import layout from '@/views/layout'
import index from '@/views/index/index'
import orders from '@/views/orders/index'
import ryPerList from '@/views/person/ry-perList'
import ryTongji from '@/views/person/ry-tongji'
import ryWorkList from '@/views/person/ry-workList'
Vue.use(VueRouter)

const routes = [
  { path: '/login', name: 'login', component: login },
  {
    path: '/',
    redirect: '/index',
    name: 'layout',
    component: layout,
    children: [
      { path: 'index', component: index },
      { path: 'orders', component: orders },
      { path: 'repair', component: () => import('@/views/orders/repair.vue') },
      { path: 'rectotal', component: () => import('@/views/Reconciliation/rectotal.vue') },
      { path: '/quyu', component: () => import('@/views/dianweiguanli/quyu.vue') },
      { path: '/ryperlist', component: ryPerList },
      { path: '/rytongji', component: ryTongji },
      { path: '/dianwei', component: () => import('@/views/dianweiguanli/dianwei.vue') },
      { path: '/hezuoshang', component: () => import('@/views/dianweiguanli/hezuoshang.vue') },
      { path: '/ryworklist', component: ryWorkList },
      { path: '/shebeiguanli', component: () => import('@/views/shebei/shebeiguanli.vue') },
      { path: '/goodstype', component: () => import('@/views/goods/goodstype') },
      { path: '/goodsmanage', component: () => import('@/views/goods/goodsmanage') },
      { path: '/sbzt', component: () => import('@/views/sbzt.vue') },
      { path: '/sblx', component: () => import('@/views/shebeileixing.vue') },
      { path: '/celue', component: () => import('@/views/strategy') },
      { path: '/dingdan', component: () => import('@/views/management') }

      // {path: '/shebeileixing',component: () => import('@/views/shebei/shebeileixing.vue')},
      // { path: '/shebeizhuangtai', component: () => import('@/views/shebei/shebeizhuangtai.vue') }
    ]
  }
]
const router = new VueRouter({
  routes
})

export default router
